package com.rerun.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rerun.common.util.JsonDateFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * sms  records
 *
 * @author dax.
 * @version v1.0
 * @since 2017 /11/1 10:24
 */
@TableName("message_records")
public class MessageRecords extends Model<MessageRecords> {

    private static final long serialVersionUID = -8154925346643237472L;
    @TableId(type = IdType.UUID)
    private String messageId;
    private String receivePhone;
    private String receiveType;
    private String sendStatus;
    private String statusCode;
    private long validity;
    private String sendContent;
    @JsonSerialize(using = JsonDateFormat.class)
    private Date sendTime;
    @JsonSerialize(using = JsonDateFormat.class)
    private Date createTime;
    private String templateCode;


    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getReceivePhone() {
        return receivePhone;
    }

    public void setReceivePhone(String receivePhone) {
        this.receivePhone = receivePhone;
    }

    public String getReceiveType() {
        return receiveType;
    }

    public void setReceiveType(String receiveType) {
        this.receiveType = receiveType;
    }

    public String getSendStatus() {
        return sendStatus;
    }

    public void setSendStatus(String sendStatus) {
        this.sendStatus = sendStatus;
    }

    public String getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }

    public long getValidity() {
        return validity;
    }

    public void setValidity(long validity) {
        this.validity = validity;
    }

    public String getSendContent() {
        return sendContent;
    }

    public void setSendContent(String sendContent) {
        this.sendContent = sendContent;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getTemplateCode() {
        return templateCode;
    }

    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }

    @Override
    protected Serializable pkVal() {
        return messageId;
    }

    @Override
    public String toString() {
        return "{" +
                "messageId:" + messageId +
                ", receivePhone:" + receivePhone +
                ", receiveType:" + receiveType +
                ", sendStatus:" + sendStatus +
                ", validity:" + validity +
                ", sendContent:" + sendContent +
                ", sendTime:" + sendTime +
                ", createTime:" + createTime +
                ", templateCode:" + templateCode +
                '}';
    }
}
